/*
package com.xiaotu.config;

import com.xiaotu.component.MyFilter;
import com.xiaotu.component.MyListener;
import com.xiaotu.component.MyServlet;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;

*/
/**
 * 嵌入式Servlet容器三大组件配置
 *//*

@Configuration
public class ServletConfig {
    //注册servlet组件
    @Bean
    public ServletRegistrationBean getServlet(MyServlet myServlet){
        ServletRegistrationBean<MyServlet> myServletServletRegistrationBean =
                new ServletRegistrationBean<>(myServlet, "/myServlet");
        return myServletServletRegistrationBean;
    }
   @Bean
    public FilterRegistrationBean getFilter(MyFilter myFilter){
        FilterRegistrationBean<MyFilter> filterRegistrationBean =
                new FilterRegistrationBean(myFilter);
        filterRegistrationBean.setUrlPatterns(Arrays.asList("/toLoginPage","/myFilter"));
        return filterRegistrationBean;
    }
    @Bean
    public ServletListenerRegistrationBean getListener(MyListener myListener){
        ServletListenerRegistrationBean servletListenerRegistrationBean =
                new ServletListenerRegistrationBean(myListener);
        return servletListenerRegistrationBean;
    }
}
*/
